<template>
  <el-col :span="12" id="menuList">
    <span>{{user}}</span>
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>系统管理</span>
        </template>
        <el-menu-item-group>
          <!--<template slot="title">系统</template>-->
          <el-menu-item index="1-1">用户管理</el-menu-item>
          <el-menu-item index="1-2">权限管理</el-menu-item>
          <el-menu-item index="1-3">角色管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
  </el-col>
</template>

<script>
export default {
  props:["user"],
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
    #menuList{
      width: 202px;
      height: 500px;
      position: fixed;
      border: 1px solid red;
      margin-top: -100px;
    }
</style>
